#ifndef _H_BASECARD
#define _H_BASECARD

#include <string>
#include <iostream>
#include <list>
#include <vector>

class baseToken;
class baseBoard;
class baseEffect;
class basePlayer;

class baseCard
{
    private:
        std::string name;
        int cost;
        int point;
        baseEffect* effect;
        std::list<baseToken> tokenList;
        baseBoard* board;
        basePlayer* owner;
        int id;

    public:
        // Constructor
        baseCard(std::string aName, int aCost, int aPoint, baseBoard* aBaseBoard, int aId);
        baseCard(std::string aName, int aCost, int aPoint, baseEffect* aEffect, baseBoard* aBaseBoard, int aId);

        // Accessor
        std::string getName();
        int getCost();
        int getPoint();
        std::list<baseToken>& getTokenList();
        baseEffect* getEffect();
        basePlayer* getOwner();
        baseBoard* getBoard();
        void setOwner(basePlayer* aPlayer);
        int getId();

        // Print
        std::string toString();
        void toString(std::ostream &out);
        void toString(std::string &str);

        bool isPayed(std::string aColor);
        void receiveToken(baseToken aToken);
        baseToken* takeToken(std::string aColor);
        void giveBackTokens();

        void getTokenColors(std::vector<std::string>& out);
        int countTokens(std::string aColors);

        bool operator== (baseCard aBaseCard);

    private:
        std::string tokenListToString();
};

#endif //_H_BASECARD